package com.cskaoyan.controller.wx;

import com.cskaoyan.service.mallservice.ImageService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.mallvo.StorageVo;
import com.fasterxml.jackson.databind.ser.Serializers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author hsp
 * @date 2021/5/12 20:54
 */
@RestController
public class WxStorageUploadController {
    @Autowired
    @Qualifier("imageServiceImpOss")
    ImageService imageService;

    @RequestMapping("wx/storage/upload")
    public BaseRespVo upload(MultipartFile file){

        StorageVo storage = imageService.createStorage(file);

        return BaseRespVo.ok(storage);


    }
}
